<template>
  <div>
    <el-form ref="searchForm" :inline="true" :model="searchData" class="ele-form-search">
      <el-form-item>
        <el-date-picker
          v-model="searchData.created_at"
          type="daterange"
          range-separator=" ~ "
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          value-format="yyyy-MM-dd"
          clearable
        />
      </el-form-item>
      <el-form-item>
        <el-button class="ele-btn-icon" icon="el-icon-search" type="primary" @click="search">查询</el-button>
        <!-- <el-button type="success" icon="el-icon-download" @click="exportData">导出数据</el-button> -->
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      searchData: {
        created_at: ''
      }
    }
  },
  methods: {
    search() {
      this.$emit('search', this.searchData)
    },
    exportData() {
      this.$emit('exportData')
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
